package j32;

import lombok.Getter;

/**
 * @author chengshuai
 * @date 2021/4/13 22:28
 */
public enum ContryEnum {

    ONE(1,"齐"),
    TWO(2,"楚"),
    THREE(3,"燕"),
    FOUR(4,"赵"),
    FIVE(5,"魏"),
    SIX(6,"韩");

    @Getter
    private Integer retCode;
    @Getter
    private String retMessage;

    ContryEnum(Integer retCode, String retMessage) {
        this.retCode = retCode;
        this.retMessage = retMessage;
    }

    public static ContryEnum forEach_CountryEnum(int index) {
        ContryEnum[] myArray = ContryEnum.values();
        for (ContryEnum element : myArray) {
            if (index == element.getRetCode()) {
                return element;
            }
        }
        return null;
    }

}
